home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig16_31.jar
/
Ch16
/
Fig16_31
/
Fig16_31.cpp
Wrap
C/C++ Source or Header
|
1997-11-10
|
391b
|
17 lines
// Fig. 16.31: fig16_31.cpp
// Using strrchr
#include <iostream.h>
#include <string.h>
int main()
{
char *string1 = "A zoo has many animals including zebras";
int c = 'z';
cout << "The remainder of string1 beginning with the\n"
<< "last occurrence of character '" << (char) c
<< "' is: \"" << strrchr( string1, c ) << '\"' << endl;
return 0;
}